The high efficiency of switching power converters has led to their near-universal adaption to power and charge mobile devices. Since a switching power converter (power adapter) switches at frequencies up to one hundred kilohertz or even higher, the power adapter may drive high frequency noise onto the AC mains. To prevent this undesirable noise from affecting the AC mains, power adapters typically include a high frequency filtering capacitor (denoted as an X class capacitor or X capacitor) that is connected across the AC line terminal (AC live) and the AC neutral terminal. The voltage on the AC line terminal will oscillate according to the AC mains' oscillation frequency (e.g., 60 Hz in the United States of America) with respect to the AC neutral terminal voltage. Depending upon when a user unplugs the power adapter from the AC mains with respect to this AC oscillation, the X capacitor may thus store a relatively large positive or negative voltage. It is thus conventional for a power adapter to include an AC detection circuit that detects whether the power adapter is connected to the AC mains. Should the AC detection circuit detect that the power adapter is disconnected from the AC mains, the power adapter triggers a bleeder circuit such as a switch to discharge the X capacitor.
But conventional AC detection and X capacitor discharge is cumbersome and increases manufacturing costs. For example, a conventional flyback converter 100 is shown in FIG. 1. An X capacitor (X CAP) connects across an AC line terminal 103 and an AC neutral terminal 105. Should these terminals be connected to the AC mains, the X capacitor will prevent switching noise from affecting the AC mains. A diode bridge rectifies an AC input voltage, V_IN (AC), from the AC mains to output a rectified voltage (V_BULK) that is stored across an input capacitor CBULK. A primary-side controller U1 regulates an output V_OUT on the secondary side of a transformer T by modulating the ON and OFF cycles of power transistor S1 connected to a primary winding of the transformer.
Controller U1 detects whether terminals 103 and 105 are connected to the AC mains through an AC detection circuit that drives an AC detection signal to an AC detection terminal or pin for controller U1. In flyback converter 100, the AC detection circuit includes a pair of diodes that couple from terminals 103 and 105 to the AC detection terminal. Controller U1 is configured to detect whether a voltage of the AC detection pin is oscillating according to the AC oscillation for the AC input voltage. Should controller U1 detect that the AC detection pin voltage is not oscillating, it discharges the X capacitor by asserting a voltage of an X capacitor discharge terminal or pin (X CAP Discharge) to close an X capacitor discharge switch 109. X capacitor discharge switch 109 couples across terminals 103 and 105 so that the X capacitor is discharged when X capacitor discharge switch 109 is closed. Controller U1 thus requires two separate pins to accommodate the AC detection and X capacitor discharge process. Each additional pin raises the manufacturing cost for controller U1.
Accordingly, there is a need in the art for improved AC detection and filtering capacitor discharge control for switching power converters having reduced manufacturing costs.